package com.blink.optimize.apis.clone;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * <ClassName>TestClone</ClassName>
 * <Description></Description>
 *
 * @Author liuxianzhao
 * @Date 2018年01月06日 11:33
 */
public class TestClone {
    private static Credit BaseCredit = new Credit("liu", "add", 11, new User(), new ArrayList<String>(), new HashMap<String, String>());

    public static void main(String[] args) throws Exception {
        long start1 = System.currentTimeMillis();
        for (int i = 0; i < 100000000; i++) {
            Credit credit = (Credit) BaseCredit.clone();
        }
        System.out.println(System.currentTimeMillis() - start1);
        long start = System.currentTimeMillis();
        for (int i = 0; i < 100; i++) {
            Credit credit = new Credit("liu", "add", 11, new User(), new ArrayList<String>(), new HashMap<String, String>());
        }
        System.out.println(System.currentTimeMillis() - start);
    }
}
